import axios from "@/utils/request.js";

/**
 * 添加评论信息
 * @param {*} comment 
 * @returns 
 */
export const commentAddService = (comment) => {
    return axios.post("/commentInfo/add",comment)
}

/**
 * 根据题解id查询评论信息
 * @param {*} solutionId
 * @returns 
 */
export const commentSelectService = (solutionId) => {
    return axios.get("/commentInfo/loadDataList",{params:{
        solutionId
    }})
}

/**
 * 修改评论信息
 * @param {*} comment 
 * @returns 
 */
export const commentModifyService = (comment) => {
    return axios.put("/comment/updatecommentBycommentId",comment)
}

/**
 * 根据id删除评论信息
 * @param {*} commentId 
 * @returns 
 */
export const commentDeleteService = (commentId) => {
    return axios.delete("/commentInfo/deleteCommentInfoByCommentId",{params:{
        commentId
    }})
}